package zdream.utils.math;

import java.util.Objects;

public class Point2d {
	public float x, y;

	public Point2d() {
	}

	public Point2d(float x, float y) {
		this.x = x;
		this.y = y;
	}

	public void set(float x, float y) {
		this.x = x;
		this.y = y;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		Point2d point2d = (Point2d) o;
		return Float.compare(point2d.x, x) == 0 && Float.compare(point2d.y, y) == 0;
	}

	@Override
	public int hashCode() {
		return Objects.hash(x, y);
	}
}
